import axios from '@/common/config/axiosConfig'
import qs from 'qs'

export const insert = (data) => {
  return axios.post('/api/v1/department/insert', data)
}

export const update = (data) => {
  return axios.put('/api/v1/department/update', data)
}

export const deleteDepartment = (id) => {
  return axios.delete('/api/v1/department/deleteById', { params: { id } })
}

export const listDepartmentLimit = (params) => {
  return axios.get('/api/v1/department/queryPageList', {
    params,
    paramsSerializer: function (data) {
      return qs.stringify(data)
    }
  })
}
